package org.apple.console;

import java.util.ArrayList;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class BoiyFrame extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7403657215216691210L;

	public BoiyFrame(JPanel panel) {
		Container container = this.getContentPane();
		container.setLayout(new BorderLayout());
		// GraphPanel sinPanel = new GraphPanel();
		container.add(panel, BorderLayout.CENTER);

		this.setTitle("Show Sin Fuction!");
		this.setSize(new Dimension(400, 400));
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension frameSize = this.getSize();
		this.setLocation((screenSize.width - frameSize.width) / 2,
				(screenSize.height - frameSize.height) / 2);
		this.setVisible(true);
	}

	public static void main(String[] args) {
		ArrayList<String> datas = new ArrayList<String> ();
		datas.add("10");
		datas.add("20");
		datas.add("30");
		datas.add("40");
		datas.add("50");
		
		// new BoiyFrame(new GraphPanel(datas));
	}
}
